package com.ganmiao.web.supplier.controller;

import com.ganmiao.server.supplier.entity.Tender;
import com.ganmiao.server.supplier.service.TenderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

public class TenderController {

    @Autowired
    private TenderService tenderService;

    @GetMapping("/get")
    public Tender tendersGet(@RequestParam Integer id){
        return tenderService.tendersGet(id);
    }

    @GetMapping("/getAll")
    public List<Tender> getAllTenders() {
        return tenderService.getAllTenders();
    }
}
